package com.yeban.bams.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 更新下一个id的值
 */
public interface NextIdMapper {

    @Select("select next_id from nextid limit 1")
    public Long selectNextId();

    @Update("update nextid set next_id=#{nextId}")
    public boolean updateNextId(Long nextId);

    @Insert("insert into nextid(next_id) values(#{nextId})")
    public boolean insertNextId(Long nextId);
}
